<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLotTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
	  Schema::create('lots', function(Blueprint $table)
          {
              $table->engine = 'InnoDB';
              $table->increments('id');
              $table->integer('group_id')->references('id')->on('groups')->index();
              $table->integer('item_type_id')->references('id')->on('item_types')->index();
              $table->integer('container_id')->references('id')->on('containers')->index();
              $table->date('product_date');
              $table->float('pounds_per_item');
              $table->text('note');
              $table->timestamps();
          });
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
            Schema::table('lots', function(Blueprint $table)
            {
                Schema::drop('lots');            
            });
	}

}
